#ifndef _STRAWGUI_TEXTURE_RESOURCE_MODULE_H_
#define _STRAWGUI_TEXTURE_RESOURCE_MODULE_H_

#include "sNamedObject.h"
#include "sMath.h"
#include "sDrawable.h"
#include "sLinkTo.h"
#include "sTexturePreset.h"

namespace sgui
{
namespace res
{    
	class sTextureResourceModule : public sNamedObject
		, public inst::sDrawable
	{
	private:
		math::sRectsf						m_rect;
		sLinkTo<preset::sTexturePreset>		m_preset;
	public:
		sLinkTo<preset::sTexturePreset>&	getPreset();
		math::sRectf&						getRect();

		void load(const db::Record &file);
		void save(db::Record &file) const;
        void clear();

		void draw(engine::sDrawStack& drawStack) const;

#ifdef _EDITOR
		void exportRTTI(rtti::sInfoList& list);
#endif

		sTextureResourceModule(sGUI& gui, const std::wstring& name);
        ~sTextureResourceModule();
	};

};
};

#endif